#include<stdio.h>
int main()
{
	int a, b;
	scanf_s("%d %d", &a, &b);
	int shang, yushu;
	shang = a / b;
	yushu = a % b;
	printf("%d %d", shang, yushu);
	return 0;
}